package model

import (
	"gorm.io/gorm"
	"time"
)

type HouseReservation struct {
	Id              uint           `gorm:"column:id;type:bigint(20) UNSIGNED;primaryKey;not null;" json:"id"`
	UserId          uint           `gorm:"column:user_id;type:bigint(20) UNSIGNED;not null;" json:"user_id"`                                         //用户Id
	HouseId         uint           `gorm:"column:house_id;type:bigint(20) UNSIGNED;not null;" json:"house_id"`                                       //房源Id
	ReservationTime string         `gorm:"column:reservation_time;type:varchar(50);not null;" json:"reservation_time"`                               //预约时间
	CreatedAt       time.Time      `gorm:"column:created_at;type:datetime(3);comment:创建时间;not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"` // 创建时间
	UpdatedAt       time.Time      `gorm:"column:updated_at;type:datetime(3);comment:修改时间;not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"` // 修改时间
	DeletedAt       gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);comment:删除时间;default:NULL;" json:"deleted_at"`
}
